<?php
require('../vendor/autoload.php');

use BitWasp\Bitcoin\Mnemonic\MnemonicFactory;
use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeyFactory;

$mnemonic = file_get_contents('./wallet/mnemonic');

$bip39 = MnemonicFactory::bip39();
$entropy = $bip39->mnemonicToEntropy($mnemonic);

$masterKey = HierarchicalKeyFactory::fromEntropy($entropy);
echo 'master private key => ' . $masterKey->getPrivateKey()->getHex() . PHP_EOL;
echo 'master public key =>' . $masterKey->getPublicKey()->getHex() . PHP_EOL;